home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Joystick Magazine 1995 July & August
/
cd No4 joystick No62.iso
/
mac
/
pc
/
SHARE
/
LIGHTLIB
/
LANGUAGE.Z
/
LLIDVIEW.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-20
|
4KB
|
119 lines
// LLIDview.h : interface of the CLLIDView class
//
/////////////////////////////////////////////////////////////////////////////
#define HINT_UPDATE_WINDOW 0
//int _export OnIdle( DWORD dwType,
int EXPORTED OnIdle( DWORD dwType,
LONG lParam,
LLOBJECT pImage,
DWORD dwAction,
DWORD dwDevice,
DWORD dwFormat,
DWORD dwUdfParam );
class CLLIDView : public CScrollView
{
protected: // create from serialization only
CLLIDView();
DECLARE_DYNCREATE(CLLIDView)
// Attributes
public:
CLLIDDoc* GetDocument();
BOOL ExclusivePaletteIsActive; // TRUE if no palette-sharing is wished
// Operations
public:
// Implementation
public:
virtual ~CLLIDView();
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual void OnUpdate(CView* pSender, LPARAM lHint = 0L, CObject* pHint = NULL);
// virtual void OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint); // original
virtual void OnInitialUpdate();
virtual void OnPrepareDC(CDC* pDC, CPrintInfo* pInfo = NULL);
virtual BOOL OnScrollBy(CSize sizeScroll, BOOL bDoScroll);
// for information on these member functions please
// read their implementation source in LLIDVIEW.CPP
void CaptureAll();
CRect GetSelection();
void Fit( UINT fitmode );
void Zoom( float zfX, float zfY, BOOL crop );
void SwapInt(int *v1, int *v2);
void SwapFloat(float *v1, float *v2);
void Rotate( int angle );
// void _export OnIdle();
void IdleStart(int times);
void IdleStop();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// zoom factor
CSize m_zoomNum;
CSize m_zoomDenom;
FARPROC pOnIdle; // pointer to OnIdle function
CRect CaptRect; // used to select a part of the image with the mouse
BOOL CaptureIsVisible; // TRUE if the capture rectangle is visible
BOOL LButtonIsDown; // TRUE if the left mousebutton is pressed down
CString Coordinates; // String to display coordinates of capturearea
float ScaleX, ScaleY; // scalefactors for zoom function
float ZoomX, ZoomY; // zoomfactors for zooming in(+) and out(-)
int rotangle; // current rotation angle used for image rotation
UINT CurrentFitMode; // flag to control image fitting
HCURSOR oldCursor; // keep the old cursor when changing its apearance
// Printing support
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
// Generated message map functions
protected:
//{{AFX_MSG(CLLIDView)
afx_msg void OnPaint();
afx_msg void OnFilePrint();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnFitHor();
afx_msg void OnFitWin();
afx_msg void OnFitVer();
afx_msg void OnTogglePalette();
afx_msg void OnRotR90();
afx_msg void OnRotL90();
afx_msg void OnRot180();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnUnfitWin();
afx_msg void OnImageInfo();
afx_msg void OnZoomIn();
afx_msg void OnZoomOut();
afx_msg void OnCrop();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in LLIDview.cpp
inline CLLIDDoc* CLLIDView::GetDocument()
{ return (CLLIDDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////